<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/AdminTemplate.xhtml">

        
        <ui:define name="page">
<!--            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
                <title>TODO supply a title</title>
            </head>-->
            <body>
            
            <h:form>
            <h:commandButton value="Mis à jour automatique des devises" action="#{adminLogin.automateUpdateDevises}" style="margin:20px" disabled="#{!adminLogin.enableUpdateDevises}" id="update" />
							<h:messages styleClass="errorMessages"/>
			</h:form>
            
            
                <table width="100%" border="0">
                    <tr>
                        <td align="center"><h1>Annonces demandeurs</h1></td>
                        <td align="center"><h1>Annonces proprietaire</h1></td>
                    </tr>
                    <tr>
                        <td align="center" valign="top" height="100%" >
                                    <h:form>
                                
                                <p:dataTable value="#{AnnoncesSession.listeannoncesc}"
                                             var="annoncec" id="Tchercheur" cellspacing="0" dynamic="true"
                                             paginator="true" paginatorPosition="bottom" rows="10"
                                             paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                             rowsPerPageTemplate="5,10,15">
                                    <!--                            <h:dataTable value="#{Annonces.listeannoncesc}" var="annoncec" id="Tchercheur"  cellspacing="0">-->
                                    <p:column>
                                        <f:facet name="header">Photo</f:facet>
                                        <h:graphicImage value="#{annoncec.annonceentity.photo}" width="100" />
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Active</f:facet>
				    #{annoncec.annonceentity.active}
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Titre</f:facet>
				    #{annoncec.annonceentity.titre}
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Ville</f:facet>
				    #{annoncec.annonceentity.ville}
                                    </p:column>
                                    <p:column>
                                        <a href="AdminAnnonceCHDetails.jsf?acid=#{annoncec.id}">Details</a>
                                    </p:column>
                                    <p:column>
                                        <h:form>
                                            <h:commandLink value="Supprimer" action="#{adminLogin.deleteAnnoncecAd}">
                                                <f:setPropertyActionListener target="#{adminLogin.actionid}" value="#{annoncec.id}" />
                                            </h:commandLink>
                                        </h:form>
                                    </p:column>
                                </p:dataTable>
                                <!--                            </h:dataTable>-->
                                <br /><br />
                                        </h:form></td>
                        <td align="center" valign="top" height="100%">
                            <h:form>
<!--                                <h1> Annonces proprietaires </h1>-->
                                <p:dataTable value="#{AnnoncesSession.listeannoncesp}"
                                             var="annoncep" id="Tproprietaire" cellspacing="0" dynamic="true"
                                             paginator="true" paginatorPosition="bottom" rows="10"
                                             paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                             rowsPerPageTemplate="5,10,15">
                                    <!--                            <h:dataTable value="#{Annonces.listeannoncesp}" var="annoncep" id="Tproprietaire" cellspacing="0">-->
                                    <p:column>
                                        <f:facet name="header">Photo</f:facet>
                                        <h:graphicImage value="#{annoncep.annonceentity.photo}" width="100" />
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Active</f:facet>
				    #{annoncep.annonceentity.active}
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Titre</f:facet>
				    #{annoncep.annonceentity.titre}
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Ville</f:facet>
				    #{annoncep.annonceentity.ville}
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Surface</f:facet>
				    #{annoncep.surface}
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">Loyer</f:facet>
				    #{annoncep.loyer}
                                    </p:column>
                                    <p:column>
                                        <a href="AdminAnnoncePropDetails.jsf?apid=#{annoncep.id}">Details</a>
                                    </p:column>
                                    <p:column>
                                        <h:form>
                                            <h:commandLink value="Supprimer" action="#{adminLogin.deleteAnnoncepAd}">
                                                <f:setPropertyActionListener target="#{adminLogin.actionid}" value="#{annoncep.id}" />
                                            </h:commandLink>
                                        </h:form>
                                    </p:column>
                                </p:dataTable>
                            </h:form> </td>
                    </tr>
                </table>
            </body>
        </ui:define>
    </ui:composition>
</html>
